package com.dd.admin.business.note.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dd.admin.business.note.domain.ReplayMeVo;
import com.dd.admin.business.note.domain.UpMeVo;
import com.dd.admin.common.model.PageFactory;
import com.dd.admin.business.note.entity.Note;
import com.dd.admin.business.note.mapper.NoteMapper;
import com.dd.admin.business.note.service.NoteService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.dd.admin.business.note.domain.NoteVo;
import com.dd.admin.business.note.domain.NoteDto;
import java.util.List;

/**
 * <p>
 * 笔记表 服务实现类
 * </p>
 *
 * @author 727869402@qq.com
 * @since 2024-12-09
 */
@Service
public class NoteServiceImpl extends ServiceImpl<NoteMapper, Note> implements NoteService {

    @Override
    public IPage<NoteVo> selectNotePage(NoteDto noteDto) {
        Page page = PageFactory.defaultPage();
        return baseMapper.selectNotePage(page,noteDto);
    }

    @Override
    public List<NoteVo> selectNoteList(NoteDto noteDto) {
        return baseMapper.selectNoteList(noteDto);
    }

    @Override
    public NoteVo selectNoteDetail(NoteDto noteDto) {
        return baseMapper.selectNoteDetail(noteDto);
    }

    @Override
    public IPage<NoteVo> selectMineUpNotes(String followId) {
        Page page = PageFactory.defaultPage();
        return baseMapper.selectMineUpNotes(page,followId);
    }

    @Override
    public IPage<NoteVo> selectMineStarNotes(String followId) {
        Page page = PageFactory.defaultPage();
        return baseMapper.selectMineStarNotes(page,followId);
    }

    @Override
    public IPage<UpMeVo> selectUpMeNotes(String authorId) {
        Page page = PageFactory.defaultPage();
        return baseMapper.selectUpMeNotes(page,authorId);
    }

    @Override
    public IPage<ReplayMeVo> selectReplyMeNotes(String authorId) {
        Page page = PageFactory.defaultPage();
        return baseMapper.selectReplyMeNotes(page,authorId);
    }

    @Override
    public IPage<NoteVo> selectNoteListLike( NoteDto noteDto) {
        Page page = PageFactory.defaultPage();
        return baseMapper.selectNoteListLike(page,noteDto);
    }

    @Override
    public List<NoteVo> selectHotNoteList() {
        return baseMapper.selectHotNoteList();
    }
}
